﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="P_PQR.aspx.cs" MasterPageFile="~/Popup.Master"
    Inherits="SAP.P_PQR" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" src="../../js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="../../js/main.js"></script>
    <script type="text/javascript">
        function RefreshUpdatePanel() {

        };

         function PopupPrint() {
           <%Session["DocumentType"] = "PQR"; %> 
            
            var url = "rptViewer.aspx?type=PQR&GeneralID=" + document.getElementById('hf_GeneralID').value;
            window.open(url, '_self');
        };

        function GetFileName(oFile, fileNo) {
           
            var FullName = oFile.value.split('\\');
            
            var FileName = FullName[FullName.length - 1];
            switch(fileNo)
            {
                case "1":
                    document.getElementById("txt_Title1").value = FileName.split('.')[0];
                    document.getElementById("txt_FileName1").value = FileName;
                    document.getElementById("txt_FileSize1").value = oFile.files[0].size;
                    break;
                case "2":
                    document.getElementById("txt_Title2").value = FileName.split('.')[0];
                    document.getElementById("txt_FileName2").value = FileName;
                    document.getElementById("txt_FileSize2").value = oFile.files[0].size;
                    break;
                case "3":
                    document.getElementById("txt_Title3").value = FileName.split('.')[0];
                    document.getElementById("txt_FileName3").value = FileName;
                    document.getElementById("txt_FileSize3").value = oFile.files[0].size;
                    break;
                case "4":
                    document.getElementById("txt_Title4").value = FileName.split('.')[0];
                    document.getElementById("txt_FileName4").value = FileName;
                    document.getElementById("txt_FileSize4").value = oFile.files[0].size;
                    break;
                case "5":
                    document.getElementById("txt_Title5").value = FileName.split('.')[0];
                    document.getElementById("txt_FileName5").value = FileName;
                    document.getElementById("txt_FileSize5").value = oFile.files[0].size;
                    break;
            }
        }
    </script>
    <div style="overflow: scroll; height: 600px;">
        <asp:UpdatePanel ID="editItemUpdatePanel" runat="server" UpdateMode="Conditional"
            ChildrenAsTriggers="True">
            <ContentTemplate>
                PRODUCT QUALITY REPORT<br />
                <table border="0" width="100%">
                    <tr>
                        <td style="width: 50%">
                            <table border="0" width="100%" style="background-color: #C9DBF2;">
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Date:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txtDate" runat="server" Enabled="False" Width="35%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Dealer:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_DealerCode" runat="server" ClientIDMode="Static" Enabled="False"
                                            Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_DealerName" runat="server" ClientIDMode="Static" Enabled="False"
                                            Width="55%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Seq No/ Vehicle Name
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_SeqNo" runat="server" Enabled="False" Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_VehicleName" runat="server" Enabled="False" Width="55%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Customer Name:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_CusName" runat="server" Enabled="False" Width="90%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        VIN:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_VIN" runat="server" Enabled="False" Width="90%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Address:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Address" runat="server" Enabled="False" Width="90%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Engine:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_EngineNum" runat="server" ClientIDMode="Static" Enabled="False"
                                            Width="55%"></asp:TextBox>
                                        <asp:TextBox ID="txt_Model" runat="server" Enabled="False" Width="35%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Use:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Use" runat="server" Width="90%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Lot No/ Rear Body
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_LotNo" runat="server" Enabled="False" Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_RearBody" runat="server" Width="55%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Country:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Country" runat="server" ClientIDMode="Static" Width="35%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Sold Date:
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_SoldDate" runat="server" ClientIDMode="Static" Enabled="False"
                                            Width="33%"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Weather/ Temperature
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Weather" runat="server" ClientIDMode="Static" Width="35%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Failure Date/ Odometer
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_FailureDate" runat="server"></asp:TextBox>
                                        <cc1:CalendarExtender ID="txt_ActualDate_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                            PopupButtonID="ImageButton7" TargetControlID="txt_FailureDate">
                                        </cc1:CalendarExtender>
                                        <asp:ImageButton ID="ImageButton7" runat="Server" AlternateText="Click to show calendar"
                                            ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                        <asp:TextBox ID="txt_Odometer" runat="server" Enabled="False" Width="33%"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Part No./ Name
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_PartNo" runat="server" Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_PartName" runat="server" Width="55%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Vehicle/ Engine Speed
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_VehicleSpeed" runat="server" Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_EngineSpeed" runat="server" Width="35%"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Maintenance:
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:RadioButtonList ID="rbl_Maintenance" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Selected="True">Good</asp:ListItem>
                                            <asp:ListItem>Average</asp:ListItem>
                                            <asp:ListItem>Bad</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Road/ Load Condition
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_RoadCondition" runat="server" Width="35%"></asp:TextBox>
                                        <asp:TextBox ID="txt_LoadCondition" runat="server" Width="35%"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Frequency:
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:RadioButtonList ID="rbl_Frequency" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Selected="True">First</asp:ListItem>
                                            <asp:ListItem>Sometimes</asp:ListItem>
                                            <asp:ListItem>Frequent</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Attachments:
                                        <asp:HiddenField ID="hf_AttID1" runat="server" ClientIDMode="Static" />
                                        <asp:HiddenField ID="hf_AttID2" runat="server" ClientIDMode="Static" />
                                        <asp:HiddenField ID="hf_AttID3" runat="server" ClientIDMode="Static" />
                                        <asp:HiddenField ID="hf_AttID4" runat="server" ClientIDMode="Static" />
                                        <asp:HiddenField ID="hf_AttID5" runat="server" ClientIDMode="Static" />
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <table width="100%" border="1">
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    No.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    Title
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    File Name
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    Select
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 10%">
                                                    Size (KB)
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 10%">
                                                    Delete
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    1.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_Title1" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_FileName1" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:FileUpload ID="FileUploadControl_1" runat="server" onchange="GetFileName(this, '1');"
                                                        Width="99%" ClientIDMode="Static" />
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:TextBox ID="txt_FileSize1" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:Button ID="btn_Delete1" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Delete" Width="45%" />
                                                    <asp:Button ID="btn_Download1" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Download" Width="45%" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    2.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_Title2" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_FileName2" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:FileUpload ID="FileUploadControl_2" runat="server" onchange="GetFileName(this, '2');"
                                                        Width="99%" ClientIDMode="Static" />
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:TextBox ID="txt_FileSize2" runat="server"  Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:Button ID="btn_Delete2" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Delete" Width="45%" />
                                                    <asp:Button ID="btn_Download2" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Download" Width="45%" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    3.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_Title3" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_FileName3" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:FileUpload ID="FileUploadControl_3" runat="server" onchange="GetFileName(this, '3');"
                                                        Width="99%" ClientIDMode="Static" />
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:TextBox ID="txt_FileSize3" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:Button ID="btn_Delete3" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Delete" Width="45%" />
                                                    <asp:Button ID="btn_Download3" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Download" Width="45%" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    4.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_Title4" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_FileName4" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:FileUpload ID="FileUploadControl_4" runat="server" onchange="GetFileName(this, '4');"
                                                        Width="99%" ClientIDMode="Static" />
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:TextBox ID="txt_FileSize4" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:Button ID="btn_Delete4" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Delete" Width="45%" />
                                                    <asp:Button ID="btn_Download4" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Download" Width="45%" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="FormLineItemAlt" style="width: 5%">
                                                    5.
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_Title5" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt" style="width: 15%">
                                                    <asp:TextBox ID="txt_FileName5" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:FileUpload ID="FileUploadControl_5" runat="server" onchange="GetFileName(this, '5');"
                                                        Width="99%" ClientIDMode="Static" />
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:TextBox ID="txt_FileSize5" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                                </td>
                                                <td class="FormLineItemAlt">
                                                    <asp:Button ID="btn_Delete5" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Delete" Width="45%" />
                                                    <asp:Button ID="btn_Download5" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                                        Height="20px" Text="Download" Width="45%" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Subject:
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_Subject" runat="server" Height="53px" TextMode="MultiLine" Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        1. Destination of Incident Or Symptom:
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_Destination" runat="server" Height="53px" TextMode="MultiLine"
                                            Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        2. Possible Cause
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_PossibleCause" runat="server" Height="53px" TextMode="MultiLine"
                                            Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        3. Action Taken Result
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_Actiontaken" runat="server" Height="53px" TextMode="MultiLine"
                                            Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        4. Additional Comments:
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_AdditionalComments" runat="server" Height="53px" TextMode="MultiLine"
                                            Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        VSM Comments:
                                    </td>
                                    <td class="FormLineItemAlt" colspan="3">
                                        <asp:TextBox ID="txt_VSMComments" runat="server" Height="53px" TextMode="MultiLine"
                                            Width="96%"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <table border="0" width="100%">
                    <tr>
                        <td class="style2">
                            <asp:Button ID="btn_Save" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" Text="Save" Width="90px" OnClick="btn_Save_Click" />
                            <asp:Button ID="btn_Print" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" Text="Print" Width="90px" OnClientClick="PopupPrint();" />
                            <asp:Button ID="Button2" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF" Height="30px"
                                OnClientClick="return Main.cancelDialogClick()" Text="Close" Width="90px" />
                            <asp:Label ID="lb_Message" runat="server" Text="[]"></asp:Label>
                            <asp:HiddenField ID="hf_GeneralID" runat="server" ClientIDMode="Static" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btn_Save" />
            </Triggers>
        </asp:UpdatePanel>
        <script src="Scripts/jquery.min.js" type="text/javascript"></script>
        <script src="Scripts/chosen.jquery.js" type="text/javascript"></script>
        <script type="text/javascript">            $(".chzn-select").chosen(); $(".chzn-select-deselect").chosen({ allow_single_deselect: true }); </script>
    </div>
</asp:Content>
